package top.lvkun.user.mapper;

import org.springframework.stereotype.Component;
import top.lvkun.basic.mapper.BaseMapper;
import top.lvkun.user.domain.User;
import top.lvkun.user.domain.UserAddress;
import top.lvkun.user.domain.dto.UserDto;

import java.util.List;

@Component
public interface UserMapper extends BaseMapper<User> {

    User findByPhone(String phone);

    User findCountByUser(UserDto userDto);

    /**
     * 前台: 查询当前登录用户的地址们
     * @param id
     * @return
     */
    List<UserAddress> getUserAddresses(Long id);
}
